Logic statement, logic circuit & truth-table



Learning Objectives : Student should be able to -


Create a Logic-circuit for the given Logic statement and complete the Truth-table

Q1. a)  Draw the logic circuit represented by the logic statement.

X = 1, if (B is 0 AND S is 0) OR (P is 0 AND S is 1)

Solution :

⇒  Convert the logic statement in terms of 1's, like -

X = 1, if (B is NOT 1 AND S is NOT 1) OR (P is NOT 1 AND S is 1)

⇒  To draw the logic circit, we start with each part in brackets, starting from lower level from inside.

⇒  B is NOT 1 is one gate, means NOT of B, invert the signal B using NOT-gate.

Step-1 :  Join the NOT of B, and NOT of S, using AND-gate for the logic statement - (B is NOT 1 AND S is NOT 1).

Step-2 :  Similarly, join the NOT of P, and S, using AND-gate for the logic statement - (P is NOT 1 AND S is 1).

Step-3 :  Finally, join the logic statements of Step-1 and Step-2 using OR-gate.

Q3-Logic-Circuit

b)  Complete the truth table for the above logic statement.

Group G1 = (B is 0 AND S is 0) =  B . S
Group G2 = (P is 0 AND S is 1) =  P . S
Output X = G1 OR G2 =  G1 + G2
Input Working Output
B S P G1 = B . S G2 = P . S X = G1+G2 X
0 0 0 1 0 1 1
0 0 1 1 0 1 1
0 1 0 0 1 1 1
0 1 1 0 0 0 0
1 0 0 0 0 0 0
1 0 1 0 0 0 0
1 1 0 0 1 1 1
1 1 1 0 0 0 0

Q2.  Draw a logic circuit for the given logic statement :

X = (A XOR B) AND (B OR NOT C)

Do not attempt to simplify the logic statement. All logic gates must have a maximum of two inputs.

Solution :

Step-1 :  Draw Logic-circuit for the inner first group of logic statements (A XOR B).

Step-2 :  Draw Logic-circuit for the inner second group of logic statements (B OR NOT C).

Step-3 :  Draw and join the two groups of logic circuits with AND gate.

Q1-Logic-Circuit

Q3.  Consider the following logic statement :

X = (((A AND NOT B) OR (NOT (B NOR C))) AND C)

a)  Draw a logic circuit to represent the given logic statement.

Do not attempt to simplify the logic statement. All logic gates must have a maximum of two inputs.

Solution :

Step-1 :  Draw Logic-circuit for the first inner group for logic statements (B NOR C).

Step-2 :  Invert the output of first inner group by putting NOT-gate for logic statement (NOT (B NOR C)).

Step-3 :  Draw Logic-circuit for second inner group for logic statement (A AND NOT B).

Step-4 :  Draw and join the first two groups of logic circuits with OR gate for logic statement ((A AND NOT B) OR (NOT (B NOR C))).

Step-5 :  Join the output of Step-4 with input C using AND-gate to complete the logic statement for output X.

Q2-Logic-Circuit

b)  Complete the truth table for the given logic statement.

Group G1 = (A AND NOT B) =  A . B
Group G2 = NOT (B NOR C) =  NOT (B + C) =  B + C
Group G3 = G1 OR G2 =  G1 + G2
Output X = G3 AND C
Output X =  G3 . C
Input Working Output
A B C G1 = A . B G2 = B + C G3 = G1+G2 X
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 0 1 1 0
0 1 1 0 1 1 1
1 0 0 1 0 1 0
1 0 1 1 1 1 1
1 1 0 0 1 1 0
1 1 1 0 1 1 1

Write a Logic statement for the given logic-circuit and complete the Truth-table

Q1.  Consider the logic circuit.

Q4-Logic-Circuit

a)  Write a logic statement to match the given logic circuit.

Solution :

Step-1 :  Start writing the logic statement for each logic-gate from left hand side i.e. from input side to output side.

Step-2 :  A is 1 XOR C is 1,     B is 1 NAND C is NOT 1

Step-3 :  Join the both logic statement for each logic-gate using OR-gate to get the output X, like -

Logic statement :

X = 1, if (A is 1 XOR C is 1) OR (B is 1 NAND C is NOT 1)

X = 1, if (A XOR C) OR (B NAND NOT C)

b)  Complete the truth table for the given logic statement.

Group G1 = (A XOR C) =  A C

Group G3 = B NAND C = NOT (B AND C) =   NOT  G2

Group G3 =  G2, where G2 =(B . C)

Output X = G1 OR G3 =  G1 + G3

Input Working Output
A B C G1 = A C G2 = B . C G3 = G2 X
0 0 0 0 0 1 1
0 0 1 1 0 1 1
0 1 0 0 1 0 0
0 1 1 1 0 1 1
1 0 0 1 0 1 1
1 0 1 0 0 1 1
1 1 0 1 1 0 1
1 1 1 0 0 1 1

Write a Logic expression for the given Truth-table and draw the Logic-circuit

Q1.  Consider the truth table.

Input Output
A B C X
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1

a)  Write a logic expression for the given truth table.

Do not simplify the logic expression.

Solution :

Step-1 :  Identify the input conditions which produces the output X = 1 and write its logic-statement (as products of inputs).

Step-2 :  X=1, if (A is 1) AND (B is NOT 1) AND (C is NOT 1)

X=1, if (A is 1) AND (B is 1) AND (C is 1)

Step-3 :  Join the logic statements with logic operator "OR" (as sum of products), like -

Logic statement :

X = 1, if (A is 1 AND B is NOT 1 AND C is NOT 1) OR (A is 1 AND B is 1 AND C is 1)

X = ((A AND B AND C) OR (A AND NOT B AND NOT C))

b)  Draw a logic circuit to represent the given truth table.

Each logic gate should have maximum of two inputs.

Do not simplify the logic circuit.

Q6 (Ans) Logic Circuit

Q2. a)  Write down a logic expression corresponding to the following truth table:

Input Output
A B C X
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
Solution :

Step-1 :  Identify the input conditions which produces the output X = 1 and write its logic-statement (as products of inputs).

Step-2 :  X=1, if (A is NOT 1) AND (B is NOT 1) AND (C is NOT 1)

X=1, if (A is NOT 1) AND (B is NOT 1) AND (C is 1)

X=1, if (A is 1) AND (B is NOT 1) AND (C is NOT 1)

X=1, if (A is 1) AND (B is NOT 1) AND (C is 1)

Step-3 :  Join the logic statements with logic operator "OR" (as sum of products), like -

Logic statement :

X = ((NOT A AND NOT B AND NOT C) OR (NOT A AND NOT B AND C) OR (A AND NOT B AND NOT C) OR (A AND NOT B AND C))

b)  Show that the following logic expression produces the same output as your answer to part a above:

X = (NOT A AND NOT B) OR (A AND NOT B)

Solution :

Input Working Output
A B C G1 = A! . B! G2 = A . B! X = G1 + G2
0 0 0 1 0 1
0 0 1 1 0 1
0 1 0 0 0 0
0 1 1 0 0 0
1 0 0 0 1 1
1 0 1 0 1 1
1 1 0 0 0 0
1 1 1 0 0 0

Since the Truth-table of part a and part b is same, the output produced by logic expression of part b is the same as of part a.

Re-draw the Logic-circuit by replacing one or more logic-gates with specific logic-gates

Q1.  Consider the logic circuit.

Q5-Logic-Circuit

a)  Redraw the logic circuit using only 4 logic gates. Each logic gate used must have a maximum of two inputs.

Solution :

Step-1 :  Replace NOT of OR-gate with NOR-gate.

Step-2 :  Replace NOT of AND-gate with NAND-gate.

Q5-(Ans) Logic-Circuit

b)  Complete the truth table for the given logic statement.

Input Working Output
A B C G1 = (A + B) G2 = (B + C) G3 = (G1 . G2) X = G3 C
0 0 0 1 1 0 0
0 0 1 1 0 1 0
0 1 0 0 0 1 1
0 1 1 0 0 1 0
1 0 0 0 1 1 1
1 0 1 0 0 1 0
1 1 0 0 0 1 1
1 1 1 0 0 1 0

c)  Describe the purpose of a logic gate in a logic circuit.

⇒  To carry out a logical operation.

⇒  To control the flow of electricity through a logic circuit.

⇒  An input is given and the logic of the gate is applied to give an output.




* * * * * * * * *
* * * * * *
* * *
*